package com.touch.workshop.ui.expgrowth;
import javax.swing.*;
public class CurveMenuBar extends JMenuBar 
{
	private static final long serialVersionUID = 8500436419157205840L;
	protected final FileMenu FILE = new FileMenu();
	protected final EditMenu EDIT = new EditMenu();
	protected final ViewMenu VIEW = new ViewMenu();
	
	protected CurveMenuBar()
	{
		this.setName("Curve MenuBar");
		this.add(this.FILE);
		this.add(this.EDIT);
		this.add(this.VIEW);
	}
	
	protected class FileMenu extends JMenu
	{
		private static final long serialVersionUID = -1910199906220038454L;
		
		protected final JMenuItem NEW = new JMenuItem("New");
		protected final JMenuItem OPEN = new JMenuItem("Open");
		protected final JMenuItem SAVE = new JMenuItem("Save");
		protected final JMenuItem SAVEAS = new JMenuItem("Save As");
		protected final JMenuItem CLOSE = new JMenuItem("Close");
		
		/**
		 * Builds the FileMenu Object.
		 */
		public FileMenu()
		{
			super("File");
			
			
			//add each object to be accessed 
			this.add(this.NEW);
			this.add(this.OPEN);
			
			this.add(new JSeparator());
			
			this.add(this.SAVE);
			this.add(this.SAVEAS);
			
			this.add(new JSeparator());
			
			this.add(this.CLOSE);
			
		}
	}
	protected class EditMenu extends JMenu
	{
		private static final long serialVersionUID = -5787137934972618656L;
		
		protected final JMenuItem CURVE = new JMenuItem("Formula");
		protected final JMenuItem EDIT = new JMenuItem("Edit");
		protected final JMenuItem VALUES = new JMenuItem("Values");
		protected final JMenuItem EXTREMES = new JMenuItem("Level Limits");
		
		public EditMenu()
		{
			super("Edit");
			
			this.add(this.CURVE);
			this.add(this.EDIT);
			this.add(this.VALUES);
			this.add(this.EXTREMES);
		}
	}
	protected class ViewMenu extends JMenu
	{		
		private static final long serialVersionUID = -1480881155361905749L;
		
		protected final JMenuItem SCALE = new JMenuItem("Scale");
		protected final JMenuItem RESET = new JMenuItem("Reset");
		
		public ViewMenu()
		{
			super("View");
			this.add(this.SCALE);
			this.add(this.RESET);
		}
	}		
}
